/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author leandro
 */
import org.hibernate.Session;
import bierhaus.HibernateUtil;
        
        
public class conecta 
{
    public static void main(String[]args)
    {
        Session sessao=null;
        try
        {
            sessao=HibernateUtil.getSessionFactory().openSession();
            System.out.println("Conectou !");
        }
        finally
        {
            sessao.close();
            System.out.println("Conexão fechada !");
                    
        }
    }
    
}
